
 this.main=function(){
	var destroyObjs=[];
	var sm = new Ext.grid.CheckboxSelectionModel({
				singleSelect : false
			});
	var cm=getdictablecolumn(sm);
	var dataRecord = Ext.data.Record.create([
			{name : 'tableid',	type : 'int'},
			{name : 'tablecnname',	type : 'string'},
			{name : 'tablename',	type : 'string'},
			{name : 'tabletype',	type : 'string'},
			{name : 'cachetag',	type : 'string'},
			{name : 'keycolumn',	type : 'string'},
			{name : 'codecolumn',	type : 'string'},
			{name : 'namecolumn',	type : 'string'},
			{name : 'supercolumn',	type : 'string'},
			{name : 'levelnocolumn',	type : 'string'},
			{name : 'statuscolumn',	type : 'string'},
			{name : 'predefine',	type : 'string'},
			{name : 'remark',	type : 'string'},
			{name : 'createuser',	type : 'string'},
			{name : 'createtime',	type : 'string'},
			{name : 'tablekind',	type : 'int'},
			{name : 'cntablekind',	type : 'string'}
			
			]);
	var store = new Ext.data.Store({
			 autoLoad : {
					params : {
						start : 0,
						limit : 30
					}
				},
				proxy : new Ext.data.HttpProxy({
						url : basepath+'../sysControl/dic/DicManagerController/findTable.do'
						}),

				reader : new Ext.data.JsonReader({
							totalProperty : 'results',
							root : "items",
							id : 'tableid'
						}, dataRecord)
			});
	var comboStore=new Ext.data.Store({
		baseParams:{tablename:'sys_dicenumitem',groupcode:'TABLE_KIND'}, 
		autoLoad : {tablename:'sys_dicenumitem',groupcode:'TABLE_KIND'},
			proxy : new Ext.data.HttpProxy({
					url :basepath+'../sysControl/system/SysDicTableController/getTableKind.do'

					}),

			reader : new Ext.data.JsonReader({
						totalProperty : 'results'
						}, 
						Ext.data.Record.create([
						               			{name : 'ItemID',	type : 'int'},
						            			{name : 'ElementCode',	type : 'string'},
						            			{name : 'Code',	type : 'string'},
						            			{name : 'Name',	type : 'string'}
						            			])),
		 listeners:{
				'load':function()
				{
					var retype = comboStore.recordType;
	                var p = new retype({
	                	ItemID:'',
	                	Name:'全部'
	                });
					this.insert(0,p);
				}
		 }
		});
var pagingBar = new Ext.PagingToolbar({// 分页工具栏
		store : store,
		pageSize : 30,// 每页显示的条数。用于系统自动计算它的start值
		displayInfo : true,
		displayMsg : '数据从第{0}条 - 第{1} 条 共 {2}条数据',
		emptyMsg : "没有记录"

	});
	
	
	
	
	var grid = new Ext.ux.grid.LockingGridPanel({
		cm : cm,
		sm : sm,
		width:frame_center.getInnerWidth()-4,
		height:frame_center.getInnerHeight()-28,
		renderTo:'divLlist'+this.menuid,
		store : store,
		tbar : [{
			text : '数据维护',
			iconCls : 'table_goto',
			handler : function() {
				var record = grid.getSelectionModel().getSelections();
				if (record.length <= 0) {
						Ext.MessageBox.alert('提示', '需要修改的记录');
						return;
					} else if (record.length > 1) {
						Ext.MessageBox.alert('提示', '最多只能选择一行');
						return;				
					}
				var mytablename=record[0].data.tablename;
				var taburl = basepath+'../sysControl/dic/DicManagerController/dicpage.do?menuid=columncfg&tablename='+mytablename;
				addFrameCenterTab("tabdicManager_"+mytablename,taburl,mytablename+'数据维护');
			}
		},'->',{xtype:'colModelJsButton',url:'sys/dic/js/dictablecolumn.js',menuid:this.menuid},
				{xtype:'outputExcelButton',title:'表设置'},{xtype:'closePage'}
		],
		bbar : pagingBar
	});
	var tablename = new Ext.form.TextField({});
	var tablecnname = new Ext.form.TextField({});
	var tableenum_s=new Ext.form.ComboBox({
		maxLength : 12,
		triggerAction : 'all',
		mode : 'remote',
		valueField : 'ItemID',
		displayField : 'Name',
		store:comboStore
	})

			var tbar2 = new Ext.Toolbar({
				renderTo : grid.tbar,
				items : ['表名',tablecnname,'表编码',tablename,'表类型',tableenum_s,
						{ text:'查询',iconCls:'table_find',tooltip : '查询',
					  	handler : function() {
					  			addStoreBaseParams(tablename,'tablename',store);
					  			addStoreBaseParams(tablecnname,'tablecnname',store);
					  			addStoreBaseParams(tableenum_s,'tablekind',store);
								store.load({params:{start:0,limit:30}});
						}
				}]
			});
	destroyObjs[0]=tbar2;
destroyResize(grid,destroyObjs);
}
